<template>
  <el-container>
    <el-aside width="200px">
      <library-menu @selectCategory="selectCategory" ref="libraryMenu"/>
    </el-aside>
    <el-main><book ref="book"/></el-main>
  </el-container>
</template>

<script>
import LibraryMenu from "./LibraryMenu";
import Book from "./Book";
export default {
  name: "HomeLibrary",
  // eslint-disable-next-line vue/no-unused-components
  components:{LibraryMenu, Book},
  methods: {
    selectCategory(cid) {
      this.$refs.book.category = cid
      this.$refs.book.page = 1
      this.$refs.book.loadBooks()
    }
  }
}
</script>

<style scoped>

</style>